﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="manageNews.aspx.cs" Inherits="admin_manageNews" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>新闻管理</title>
    <link href="../css/body.css" rel="stylesheet" type="text/css" />
    <link href="../css/table.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .main
        {
            text-align: left;
            width: 800px;
            margin-left:50px;
            margin-top:30px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    
    <div class="main">
        <table width="650" align="center" id="Tab" class="tab">
            <tr>
                <th width="210">
                    新闻标题
                </th>
                <th width="150">
                    日期
                </th>
                <th width="50">
                    浏览
                </th>
                <th width="50">
                    状态
                </th>
                <th width="70">
                    修改
                </th>
                <th width="70">
                    删除
                </th>
            </tr>
            <asp:Repeater ID="newsList" runat="server">
                <ItemTemplate>
                    <tr style='background-color: <%#(Container.ItemIndex%2==0)?"#eeeeee":"#ffffff"%>'
                        onmouseover="this.style.background='#ddeeff'" onmouseout="this.style.background='<%#(Container.ItemIndex%2==0)?"#eeeeee":"#ffffff"%>'">
                        <td width="210">
                            <a target="_blank" href="../news.aspx?id=<%# DataBinder.Eval(Container.DataItem, "ID")%>">
                                <%# DataBinder.Eval(Container.DataItem, "title")%></a>
                        </td>
                        </td>
                        <td width="150">
                            <%# DataBinder.Eval(Container.DataItem, "newstime")%>
                        </td>
                        <td width="50">
                            <%# DataBinder.Eval(Container.DataItem, "hit")%>
                            </td>
                            <td width="50">
                            <%# DataBinder.Eval(Container.DataItem, "status").ToString().Equals("0")?"正常":"关闭"%>
                            </td>
                            <td width="70">
                                <a href="updateNews.aspx?id=<%# DataBinder.Eval(Container.DataItem, "ID")%>" target="_self">
                                    [修改]</a>
                            </td>
                            <td width="70">
                                <a href="delNews.aspx?id=<%# DataBinder.Eval(Container.DataItem, "ID")%>" onclick="javascript:return  confirm('确认删除? ');"
                                    target="_self">[删除]</a>
                            </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
        <br />
        <br />
        <div align="center">
            [页次:<asp:Label ID="nowPage" runat="server" Font-Bold="True"></asp:Label>/<asp:Label
                ID="allPages" runat="server" Font-Bold="True" ForeColor="#C00000"></asp:Label>]
            [共<asp:Label ID="allMsg" runat="server" Font-Bold="True"></asp:Label>条
            <asp:Label ID="onePage" runat="server" Font-Bold="True"></asp:Label>条/页] [<asp:HyperLink
                ID="firstPage" runat="server">首页</asp:HyperLink>] [<asp:HyperLink ID="prePage" runat="server">上一页</asp:HyperLink>]
            [<asp:HyperLink ID="nextPage" runat="server">下一页</asp:HyperLink>] [<asp:HyperLink
                ID="endPage" runat="server">尾页</asp:HyperLink>]
        </div>
    </div>
    </form>
</body>
</html>
